#!/bin/bash
# ------------------------
# Start Script for ovftool
# ------------------------

# resolve links - $0 may be a softlink
PRG="$0"

if [ -L "$PRG" ]; then
   PRG=`readlink "$PRG"`
fi

PRGDIR=`dirname "$PRG"`
OVFTOOL_BIN="$PRGDIR"/ovftool.bin

export LD_LIBRARY_PATH="$PRGDIR":"$LD_LIBRARY_PATH"

if [ ! -e "$OVFTOOL_BIN" ]; then
   echo "Cannot find $OVFTOOL_BIN"
   exit 1
fi

exec "$OVFTOOL_BIN" "$@"
exit $?
